package com.jk.mapper;

import com.jk.vo.AuthUserIdcard;
import com.jk.vo.WorkOrder;
import org.apache.ibatis.annotations.*;

import java.util.List;
import java.util.Map;

/**
 * Created by ${user} on ${data}.
 */
public interface AuthUserIdcardMapper {
    //个人身份证查询select * from auth_user_idcard t, user_login l WHERE t.user_Id=l.user_Id
    @Select("SELECT t.verify_Id AS verifyId,t.exam_status AS examStatus, " +
            "t.verify_Number AS verifyNumber, t.real_Name AS realName,\n" +
            " t.verify_Time AS verifyTime , l.user_id AS userId ,l.user_name AS userName" +
            " FROM auth_user_idcard t, user_login l WHERE t.exam_status=1 AND t.user_Id=l.user_Id\n" +
            "\n")
    List<Map> SelectAuthUserIdcard(AuthUserIdcard authUserIdcard);
    //个人身份证修改
    @Update("update auth_user_idcard  set exam_status=#{examStatus} where verify_Id=#{verifyId}")
    int UpdateAuthUserIdcard(AuthUserIdcard authUserIdcard);
    //工单表新增
    @Insert("insert into work_order(workOder_id,workOder_no,workOder_dic,workOder_time,wmployee_id,user_id)VALUES(#{workoderId},#{workoderNo},#{workoderDic},#{workoderTime},#{wmployeeId},#{userId})")
    int InsertAuthUserIdcard(WorkOrder workOrder);
}
